﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Wekit.Web.Attributes
{
    /// <summary>
    /// 邮件地址认证函数
    /// </summary>
    public class ValidEmailAddressAttribute:RegularExpressionAttribute
    {
        private const string EmailPattern = ".+@.+\\..+";
        public ValidEmailAddressAttribute()
            : base(EmailPattern)
        {
            ErrorMessage = "{0} 必须是一个格式正确的邮件地址!";
        }
    }
}
